package com.tangsm.api.demo.exception;

import com.tangsm.api.demo.enums.ResultCode;


/**
 * 业务异常类
 * @author 湯神码
 */
public class ResultException extends Exception {

    /**
     * 业务异常信息信息
     */
    ResultCode resultCode;

    public ResultException() {
        this(ResultCode.INTERNAL_SERVER_ERROR);
    }

    public ResultException(ResultCode resultCode) {
        super(resultCode.getMessage());
        this.resultCode = resultCode;
    }

    public ResultCode getResultCode() {
        return resultCode;
    }
}